package com.lc.demo.mapper;

import com.lc.demo.bean.Classgrade;
import com.lc.demo.bean.Student;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.BaseMapper;

import java.util.List;

public interface ClassgradeMapper  extends BaseMapper<Classgrade> {

    @Select("select  *  from  student  where classid=#{id}")
    List<Student> getStudentListByClassGrade(@Param("id") Integer id);

    @Delete("delete from signin where studentid=#{username}")
    void deleteSignByStudentId(@Param("username") String username);

    @Delete("delete from leavetable where studentid=#{username}")
    void deleteLeaveByStudentId(@Param("username") String username);
    @Delete("delete from grade_course where classgradeid=#{id}")
    void deleteGradeCourseByClassgradeid(@Param("id")  Integer id);
}
